<template>
	<view class="zhu-fang-tong">		
		<cu-custom  bgImage="https://image.weilanwl.com/color2.0/plugin/sylb2244.jpg"  :isBack="true">
			<!-- <block slot="backText">首页</block> -->
			<block slot="content">筑房通</block>
		</cu-custom>
		<view class="padding-top-xs padding-bottom-xs bg-white fixed"  style="overflow: hidden;">
			<tabs :currTab="currTab" :tabList="[{value: 'room', label: '签约室'}, {value: 'self', label: '我的签约'}]" @click="tabClick">
			</tabs>
		</view>
		
			
		<!-- 需要使用 元素包裹 v-show 才能生效 -->
		
		<view style="margin-top: 76upx;">
			<view v-show="currTab==='room'">
				<SignRoom></SignRoom>
			</view>
			<view v-show="currTab==='self'">
				<SignSelf></SignSelf>
			</view>
		</view>

	</view>
</template>

 <script>
	import Tabs from '@/components/tabs/tabs.vue'
	import SignSelf from './sign/self.vue'
	import SignRoom from '@/pages/zhu-fang-tong/sign/room.vue'
	

	export default {
		components: {
			Tabs,
			SignRoom,
			SignSelf
		},
		data() {
			return {
				currTab: 'room',
			}
		},
		methods: {
			tabClick(tab) {
				this.currTab = tab.value;
			}
		}
	}
</script>

<style lang="scss">

.zhu-fang-tong {
	background: #f4f4f4;
	// background: #fff;
	.fixed {
		position: fixed;
		width: 100%;
		z-index: 999;
	}
}
.tabs-warp {
	margin-top: 10upx;
}
.input-search {
    $width: 20upx;
    position: relative;
    background: #fff;
    border-radius: $width;
    padding: 5upx $width;
    iconfont {
        top: 50%;
        margin-top: -10px;
        position: absolute;
        right: $width;
    }
}
</style>
